<?php
namespace app\index\controller;
use think\Loader;
class Lawyer extends Base{
    public function _initialize()
    {
        parent::_initialize();
        $this->assign('index_css',5);
        $this->assign('sie',pageSie(5));//页面描述与关键字
    }
    // 律师列表
    public function index()
    {
        $invoking                    = Loader::model('Other','service');
        $data                        = $invoking->lawyerList();

        $this->assign('page',$data['page']);
        $this->assign('list',$data['list']);
        return $this->fetch();
    }

    // 律师详情
    public function detail()
    {
        $invoking                    = Loader::model('Other','service');
        $data                        = $invoking->lawyerFind();
        if($data['l_name'] == '陈刚'){
            $this->assign('sie',pageSie(16));//页面描述与关键字
        }else if($data['l_name'] == '马丽'){
            $this->assign('sie',pageSie(19));//页面描述与关键字
        }else if($data['l_name'] == '胡来强'){
            $this->assign('sie',pageSie(18));//页面描述与关键字
        }else if($data['l_name'] == '杨津津'){
            $this->assign('sie',pageSie(17));//页面描述与关键字
        }

        $this->assign('data',$data);
        return $this->fetch();
    }

}
